package org.afi.mushroomplayer.model;

import java.util.ArrayList;
import java.util.List;

import android.os.Parcel;
import android.os.Parcelable;

public class SongListParcel implements Parcelable {

	private List<SongInfo> list = new ArrayList<SongInfo>();
	
	public List<SongInfo> getList() {
		return list;
	}

	public void setList(List<SongInfo> list) {
		this.list = list;
	}
	
	public SongListParcel() {
		list = new ArrayList<SongInfo>();
	}
	
	public SongListParcel(Parcel in) {
		in.readTypedList(list, SongInfo.CREATOR);
	}

	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		// TODO Auto-generated method stub
		dest.writeTypedList(list);
	}
	
	 public static final Parcelable.Creator<SongListParcel> CREATOR = new Parcelable.Creator<SongListParcel>() {

	        @Override
	        public SongListParcel createFromParcel(Parcel in) {
	            return new SongListParcel(in);
	        }

	        @Override
	        public SongListParcel[] newArray(int size) {
	            return new SongListParcel[size];
	        }
	    };

}
